﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tools;
using System.Diagnostics;
using System.Reflection;

namespace Common.Exceptions
{
    public class IncorrectArgumentException : BusinessLogicException
    {
        public string ArgumentName { get; protected set; }
        public string MethodName { get; protected set; }

        public IncorrectArgumentException(string argumentName)
            : base(ExceptionHelper.excode_incorrect_argument
                , "Argument in method has incorrect value")
        {
            ArgumentName = argumentName;
        }


        public override void Prepare()
        {
            MethodName = TargetSite.Name;
        }
    }
}
